Minor GPSBabelGUI-2 updates.
authoroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 6 Dec 2005 00:25:47 +0000 (00:25 +0000)
committeroliskoli <oliskoli@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 6 Dec 2005 00:25:47 +0000 (00:25 +0000)
gpsbabel/win32/gui-2/gnugettext.pas
gpsbabel/win32/gui-2/gnugettextD4.pas
gpsbabel/win32/gui-2/gnugettextDx.pas

index 23253e03c979fe4b1434d821ee2142803213bc06..982dea0aeb7fa75e4dc25ed3755deb8f1b895ff6 100644 (file)
@@ -3,8 +3,8 @@ unit gnugettext;
 (*                                                            *)\r
 (*  (C) Copyright by Lars B. Dybdahl and others               *)\r
 (*  E-mail: Lars@dybdahl.dk, phone +45 70201241               *)\r
-(*  File version: $Date: 2005-11-20 21:24:43 $                *)\r
-(*  Revision: $Revision: 1.2 $                          *)\r
+(*  File version: $Date: 2005-12-06 00:25:47 $                *)\r
+(*  Revision: $Revision: 1.3 $                          *)\r
 (*                                                            *)\r
 (*  Contributors: Peter Thornqvist, Troy Wolbrink,            *)\r
 (*                Frank Andreas de Groot, Igor Siticov,       *)\r
@@ -96,6 +96,7 @@ uses
 \r
 {$ifdef MSWINDOWS}\r
   Windows,\r
+  Delphi,\r
 {$else}\r
   Libc,\r
 {$endif}\r
index 3d378f67569032e4cbda3a5f4b6e6a40a7de3bf8..bed4d3066ff6fb5bfd9a2fe278f0a0626fd914f6 100644 (file)
@@ -1,6 +1,6 @@
 unit gnugettextD4;\r
-(*  File version: $Date: 2005-11-20 21:28:09 $ *)\r
-(*  Revision: $Revision: 1.2 $ *)\r
+(*  File version: $Date: 2005-12-06 00:25:47 $ *)\r
+(*  Revision: $Revision: 1.3 $ *)\r
 // Delphi 5 optimized interface for gnugettext.pas\r
 // This unit must only be used on Delphi 5. When you upgrade to Delphi 6 or\r
 // later, you should remove this unit and replace all reference to gnugettextD5\r
@@ -10,7 +10,7 @@ interface
 \r
 uses\r
   Classes, TypInfo;\r
-  \r
+\r
 // Ansistring versions of the api\r
 function _(const szMsgId: string): string;\r
 function gettext(const szMsgId: string): string;\r
@@ -43,11 +43,6 @@ procedure FreeAndNil(var P);
 function IncludeTrailingBackSlash(const Path: string): string;\r
 function ExcludeTrailingBackslash(const Path: string): string;\r
 \r
-function GetStrProp(Instance: TObject; const Name: string): string; overload;\r
-function GetStrProp(Instance: TObject; Info: PPropInfo): string; overload;\r
-procedure SetStrProp(Instance: TObject; const Name, Value: string); overload;\r
-procedure SetStrProp(Instance: TObject; Info: PPropInfo; const Value: string); overload;\r
-\r
 implementation\r
 \r
 uses\r
@@ -292,62 +287,4 @@ begin
   SetString(Result, PChar(Path), Len);\r
 end;\r
 \r
-function GetPropInfo(Instance: TObject; const Name: string; var PropInfo: TPropInfo): Boolean;\r
-var\r
-  Props: PPropList;\r
-  TypeData: PTypeData;\r
-  Info: PPropInfo;\r
-  i: Integer;\r
-begin\r
-  TypeData := GetTypeData(Instance.ClassInfo);\r
-  if ((TypeData <> nil) and (TypeData^.PropCount > 0)) then\r
-  begin\r
-    GetMem(Props, TypeData^.PropCount * sizeof(Pointer));\r
-    try\r
-      GetPropInfos(Instance.ClassInfo, Props);\r
-      for i := 0 to TypeData.PropCount - 1 do\r
-      begin\r
-        Info := Props[i];\r
-        if (AnsiCompareText(Info.Name, Name) = 0) then\r
-        begin\r
-          PropInfo := Info^;\r
-          Result := True;\r
-          Exit;\r
-        end\r
-      end;\r
-    finally\r
-      FreeMem(Props);\r
-    end;\r
-  end;\r
-  Result := False;\r
-end;\r
-\r
-function GetStrProp(Instance: TObject; Info: PPropInfo): string;\r
-begin\r
-  Result := TypInfo.GetStrProp(Instance, Info);\r
-end;\r
-\r
-function GetStrProp(Instance: TObject; const Name: string): string;\r
-var\r
-  Info: TPropInfo;\r
-begin\r
-  if GetPropInfo(Instance, Name, Info) then\r
-    Result := TypInfo.GetStrProp(Instance, @Info)\r
-  else\r
-    Result := '';\r
-end;\r
-\r
-procedure SetStrProp(Instance: TObject; const Name, Value: string);\r
-var\r
-  Info: TPropInfo;\r
-begin\r
-  if GetPropInfo(Instance, Name, Info) then\r
-    SetStrProp(Instance, @Info, Value);\r
-end;\r
-\r
-procedure SetStrProp(Instance: TObject; Info: PPropInfo; const Value: string);\r
-begin\r
-  TypInfo.SetStrProp(Instance, Info, Value);\r
-end;\r
-\r
 end.\r
index 4505645e31816a1af01c97a2291e0898a0d5582b..af1c713b80d954f184bde6f90f342c95bba0b6ec 100644 (file)
@@ -19,13 +19,6 @@ function gettext(const szMsgId: string): string;
 function dgettext(const szDomain: string; const szMsgId: string): string;\r
 procedure TranslateComponent(AnObject: TComponent);\r
 \r
-{$IFDEF VER120}\r
-function GetStrProp(Instance: TObject; const Name: string): string; overload;\r
-function GetStrProp(Instance: TObject; Info: PPropInfo): string; overload;\r
-procedure SetStrProp(Instance: TObject; const Name, Value: string); overload;\r
-procedure SetStrProp(Instance: TObject; Info: PPropInfo; const Value: string); overload;\r
-{$ENDIF}\r
-\r
 implementation\r
 \r
 function _(const szMsgId: string): string;\r
@@ -76,27 +69,4 @@ begin
 {$ENDIF}{$ENDIF}\r
 end;\r
 \r
-{$IFDEF VER120}\r
-function GetStrProp(Instance: TObject; const Name: string): string;\r
-begin\r
-  Result := gnugettextD4.GetStrProp(Instance, Name);\r
-end;\r
-\r
-function GetStrProp(Instance: TObject; Info: PPropInfo): string;\r
-begin\r
-  Result := gnugettextD4.GetStrProp(Instance, Info);\r
-end;\r
-\r
-procedure SetStrProp(Instance: TObject; const Name, Value: string);\r
-begin\r
-  gnugettextD4.SetStrProp(Instance, Name, Value);\r
-end;\r
-\r
-procedure SetStrProp(Instance: TObject; Info: PPropInfo; const Value: string);\r
-begin\r
-  gnugettextD4.SetStrProp(Instance, Info, Value);\r
-end;\r
-\r
-{$ENDIF}\r
-\r
 end.\r